package org.come.xinyuan;

import com.tool.pet.PetProperty;
import org.come.action.FromServerAction;
import org.come.entity.RoleSummoning;
import org.come.until.FormsManagement;
import org.come.until.GsonUtil;
import org.come.until.UserMessUntil;

public class XinyuanControl implements FromServerAction {
    @Override
    public void controlMessFromServer(String mes, String type) {
        RoleSummoning pet = GsonUtil.getGsonUtil().getgson().fromJson(mes, RoleSummoning.class);
        String[] data = null;
        if (pet.getXinyuan().split("&").length > 1) {
            data = pet.getXinyuan().split("&")[1].split("\\|");
        }
        SkillMainPanel5.copyOfSkillTYCPanel.initTYC("心意", data, 0);
        //更新召唤兽面板
        int[] petvalue = PetProperty.getPetHMASp(pet);
        if (FormsManagement.getframe(58).isVisible()) {
            PetProperty.ShowQl(UserMessUntil.getChosePetMes());
        }

    }
}
